
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta itemprop="name" content="{$article['title']}"/>
    <meta itemprop="image" content="logo.png" />
    <meta name="description" itemprop="description" content="{$article['title']}"/>
    <title id="<pushPage></pushPage>">{$article['title']}</title>
    <link rel="stylesheet" href="/static/css/style.min.css">
    <script type="text/javascript" src="/static/js/setfontsize.js?v=6"></script>
    <script src="//res2.wx.qq.com/open/js/jweixin-1.4.0.js" charset="utf-8"></script>
    <style>.posi{position:fixed;left:0;bottom:0;width:100%}</style>
    <style>
        .topbanner{position:fixed;top:0;left:0;width:100%;transform:translateY(-100%);transition:all 200ms;visibility:hidden;opacity:0;z-index:9999}
        .topbanner.show{transform:translateY(0);transition:all 300ms;visibility:visible;opacity:1}
    </style>
<!--    <script>-->
<!--        window.location.href = "https://www.taoxtao.cn/baidu_ad.html";-->
<!--    </script>-->
</head>
<body>
<div class="container" style="padding-bottom:20px">
    <div id="notices" style="display:none;position:fixed;z-index:99999;left:0;top:0;width:100%;padding:30px 0;text-align:center;color:#EEE;background-color:rgba(0,0,0,.85)">
        <span style="display:block;width:80%;margin:0 auto;line-height:25px">点击右上角按钮，在浏览器中打开。查看更多精彩内容</span>
        <img src="/static/img/css-background/down-shar.png" style="position:fixed;right:3%;top:0;width:10%">
    </div>
    <div class="page_title">{$article['title']}</div>
    <img id="cover"  src="{$article['cover']}" alt="cover" style="width:100%;">

    <div class="page_content">
        <div class="wonderful" style="margin:15px 0;font-size:18px;padding:10px 5px;line-height:1.6em;border:2px solid #676767;color:red">{$article['description']}</div>
        <div id="content" class="page_con_title">
            <div class="page_section">
                <volist name="bookinfos" id="vs">
                    <div class="page_con_info">
                        <section class="KolEditor">
                            <section style="">
                                <section style="">
                                    <img src="/static/images/163012f1c2939d4d40d91620f9c136b124844a.png" style="max-width: 100%; margin: 0px auto; vertical-align: middle;" class="KolImg">
                                </section>
                                <!--<p style="" class="chapter_sort"> 第 1 章 </p>-->
                                <p style="" class="chapter_sort"> {$vs.title2}</p>
                                <section style="">
                                    <img src="/static/images/163012a9ab4ed9b4e7decdce4b2a759fbc9861.png" style="max-width: 100%; margin: 0px auto; vertical-align: middle;" class="KolImg">
                                </section>
                            </section>
                        </section>
                        <div class="chapter_content">
                            {$vs.content}
                        </div>
                    </div>
                </volist>
            </div>
        </div>
    </div>
    <div class="landing modal">
        <div class="main">
            <div class="txt">
                <div class="follow-up pink" style="margin-top:20px">
                    <h4 style="margin:5px 0">请使用微信扫码继续观看精彩内容:</h4>
                    <img id="qrcode" src="" style="width:80%;height:auto;margin:0;border:2px solid #EEE;border-radius:6px">
                    <p style="">小提示:</p>
                    <p style="font-size:12px">保存二维码->微信打开扫一扫->相册->选择刚才保存的二维码->关注公众号即可阅读</p>
                </div>
                <span class="close"></span>
            </div>
        </div>
    </div>

    <div class="landing2 modal">
        <div class="main">
            <div class="txt">
                <div class="follow-up pink" style="margin-top:20px">
                    <h4 style="margin:5px auto;line-height:24px;width:80%">如无法自动下载APP，请手动复制链接到浏览器打开 即可下载!</h4>
                    <p style="text-align:center;margin-top:15px">
                        <b style="display:block;padding:5px 0;background-color:#EEE">http://zmspread.yangtaowoer.com/97117/2859/0/1</b>&nbsp
                        <button style="margin-top:10px" class="copy-btn" data-clipboard-text="http://zmspread.yangtaowoer.com/97117/2859/0/1" type="button">点此快速复制</button>
                    </p>
                </div>
                <span class="close"></span>
            </div>
        </div>
    </div>

    <div class="readMore_new">
        <p><b>你刚才收看的是《{$book['title']}》</b></p>
        <p><b>未完待续.....篇幅有限，后续剧情高潮不断！点击下载APP继续免费阅读</b></p>
        <div class="sloider"></div>
        <div class="app-download">
            <div class="app—logo"><img src="/app_download.png" alt="蜜桃藏书"></div>
            <div class="app-logo-2">
                <div><h4>蜜桃藏书</h4></div>
                <div><p>10万本书随意看，没广告不收费</p></div>
                <div class="app-info-desc"><div>版本1.2.2</div><div>|</div><div>大小:12MB</div></div>
            </div>
            <div class="app—logo-3"><button onclick="next()">安装</button></div>
        </div>
    </div>

<!--    <div onclick="next()" class="page_read_all"><b>点我免费下载APP继续阅读</b></div>-->
</div>
<style>
    .app-download{
        display: flex;
        align-content: space-between;
        margin: 10px 0;
    }
    .app—logo{
        width: 22%;
        padding-right:10px;
        display: flex;
        align-items: center;
    }
    .app-logo-2{
        width: 80%;
        padding: 1px 10px;
    }
    .app—logo img{
        width: 80px;
    }
    .app-info-desc{
        display: flex;
        align-content: space-between;
    }
    .app-info-desc div{
     padding: 2px;
    }
    .app—logo-3{
        width: 13%;
    }
    .app—logo-3{
        display: flex;
        align-items: center;
    }
    .app—logo-3 button{
        color: white;
        background: #19ad94;
        border: none;
        width: 60px;
        height: 30px;
        border-radius: 30px;
    }
</style>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/zepto.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/clipboard.min.js"></script>
<script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/dom-to-image/2.6.0/dom-to-image.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/2.2/layer.js"></script>

<script>
    var Url,channel=1;
    var isPure = 1;
    var jump = '';
    var uid = "{$uid}";
    var autoDown = "0";
    var android_url = "{$download['android']}";
    var ios_url= "{$download['ios']}";
    var baidu_ad = "https://www.taoxtao.cn/baidu_ad.html";
    var u = navigator.userAgent,
        isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
    //    var contImg = ["http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_1.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_2.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_3.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_4.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_5.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_6.jpg"] || [],
    var contImg = ["http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_1.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_2.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_3.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_4.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_5.jpg","http:\/\/novel-picture.oss-cn-shenzhen.aliyuncs.com\/wtImg\/wtcontent\/wtlist_6.jpg"] || [],
        $tagP = $(".chapter_content p"),
        interval = Math.floor($tagP.length / contImg.length);
    var isWechat = window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
    var tp = {"total_page":"tp_0","total_click_ios":"tci_0","total_click_andr":"tca_0","channel_page":"cp_2148","channel_click_ios":"cci_2148","channel_click_andr":"cca_2148","link_page":"lp_2859","link_click_ios":"lci_2859","link_click_andr":"lca_2859","back":0,"auto":0};
    var id = "{$id}";
    id = id || 5869599;
    var  backUrl = '';
    var sUserAgent = navigator.userAgent.toLowerCase();

    var is_download_app = function (){
        console.log("is_download_app");
        //如果是下载小说app的往下执行
        var posturl = "{:U('helloworld')}"
        var token = "{$token}"
        var id  = "{:I('get.id')}";
        var adpage_id = "{$adpage_id}";
        var channel = "{$channel}";
        var data = {token:token,channel:channel,id:id,uid:uid,adpage_id:adpage_id};
        $.post(posturl,{data:data},function(res){
            console.log(Url);
            window.location.href = Url;
        })
        return false
    }


    if(sUserAgent.indexOf("baidu") > 0) {

        backUrl = baidu_ad;//跳转关注公众号
    }else if(isWechat){
        ////公众号小说
        backUrl = baidu_ad;
    }else{
        backUrl = baidu_ad;//百度落地页
    }
    var clipboard = new Clipboard('.copy-btn');
    var next = function () {
        if(isWechat){
            if (isIOS){
                channel = 1;
                window.location.href = baidu_ad;

                return ;
            }else{
                $('#notices').show();
                console.log('android');
                Url = android_url;
                channel = 2;
                // window.location.href = Url;
                alert('请点击页面右上角三个点，选择用微信以外的浏览器打开，再点下载');
                return ;
            }
        } else {
            if(isIOS){

                channel = 1;
                window.location.href = baidu_ad;
                return ;
            }else{
                console.log('android');
                Url = android_url;
                channel = 2;
                is_download_app();
                // window.location.href = Url;
            }
        }

    }

    var backCominit = function(url, isReplace) {

        // 返回
        console.log('backCominit');
        var state = {title: "百度热门视频", url: "#"};
        window.history.pushState(state, "好看视频", "#");
        window.addEventListener('load', function(){
            console.log('load');
            setTimeout(function() {
                console.log('setTimeout');
                window.addEventListener("popstate", function(e) {
                    console.log('popstate');
                    isReplace ? window.location.replace(url) : window.location.href = url
                }, false);
            },0);
        })
    };

    $('.landing .close').click(function () {
        $('.landing').removeClass('show')
    })
    $('.landing2 .close').click(function () {
        $('.landing2').removeClass('show')
    })


    backUrl && backCominit(backUrl, true)
    !!parseInt(autoDown) && next()

    //    for (var i in contImg) $('<img src="'+ contImg[i] +'" alt="cover" class="page_info_img" width="100%" />').insertAfter($tagP[interval * (parseInt(i) + 1)]);


    clipboard.on('success', function(e) {
        alert("复制成功!");
    });
    clipboard.on('error', function(e) {
        alert("复制出错了，请手动复制链接到浏览器打开");
    });

    $('.downd').click(function () {
        next()
    })

    if (isPure === 1) {
        $(window).scroll(function(){
            if ($(window).scrollTop() > 2000) {
                $('#adimg').addClass('posi')
                $('body').css('padding-bottom', $(window).width() * 0.228 + 'px')
            } else {
                $('#adimg').removeClass('posi')
                $('body').css('padding-bottom', 0)
            }
        });
    }
</script>
<script>
    $(document).ready(function(){
        var $topbanner = $('img.topbanner');
        var p=0,t=0;
        $(window).scroll(function(e){
            p = $(this).scrollTop();
            if(t<=p){
                //下滚
                $topbanner.is('.show') && $topbanner.removeClass('show')
            } else{
                //上滚
                $topbanner.is('.show') || $topbanner.addClass('show')
            }
            setTimeout(function(){t = p;},0);
        });
    });
</script>
<script>
    var url = "{:U('WeChat/getsdk')}";
    $.ajax({
        type: "GET",
        url: url+"?url=" + encodeURIComponent(location.href.split('#')[0]) + '&_=' + Date.now(),
        dataType: "jsonp",
        jsonp: "callback",
        data: {},
        success: function(resultsdk) {
            console.log('resultsdk',resultsdk);
            window.data = resultsdk;

            window.config = {
                debug: false,
                appId: window.data.appId,
                timestamp:window.data.timestamp,
                nonceStr: window.data.nonceStr,
                signature: window.data.signature,
                jsApiList: ['checkJsApi','onMenuShareAppMessage', 'onMenuShareTimeline', 'hideMenuItems', 'showMenuItems','showAllNonBaseMenuItem']
            };

            wx.config(window.config);
            var link =  window.location.href;
            var title = $('.page_title').text();
            var desc = $('.wonderful').text();
            var imgUrl = $('#cover').attr('src');
            link = link;
            wx.ready(function () {
                wx.onMenuShareAppMessage({
                    title: title,
                    desc: desc,
                    link: link,
                    type: 'images',
                    imgUrl: imgUrl,
                    success: function () {
                    },
                    cancel: function () {
                    }
                });
                wx.onMenuShareTimeline({
                    title: title,
                    desc: desc,
                    link: link,
                    imgUrl: imgUrl,
                    success: function(res){
                        console.log(res);

                    },
                    cancel: function(res) {
                        console.log(res);
                    }
                });
            })
        }

    });
</script>
<script>
    var preview = "{$preview}";
    console.log(typeof preview);
    if(preview==1){
        console.log(preview);
        var node = document.getElementById('content');
        domtoimage.toPng(node)
            .then(function (dataUrl) {
                var img = new Image();
                img.src = dataUrl;
                var id = "{$bookinfo['bid']}";
//        document.body.appendChild(img);
                $.post("{:U('saveArticleImg')}",{img:dataUrl,bid:id},function(resp){
                    console.log(resp);
                })
            });
    }

</script>

</body>
</html>